import { createApp } from 'vue'

import App from './App.vue'
import persist from 'pinia-plugin-persistedstate'
import ECharts from 'vue-echarts'
import 'echarts';

import TDesign from 'tdesign-vue-next';
import 'tdesign-vue-next/es/style/index.css';

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
const app = createApp(App)
app.use(TDesign);
app.use(ElementPlus)
app.component('ECharts',ECharts)
//异步引入
async function asyncRegister() {  
    const { createPinia } = await import('pinia')  
    app.use(createPinia().use(persist))  
    const router = (await import('./router')).default  
    app.use(router)  
  
    // 挂载应用程序  
    app.mount('#app')  
} 
    
asyncRegister()



